<?php

namespace App\Models;

use Illuminate\Database\Eloquent\Factories\HasFactory;
use Illuminate\Database\Eloquent\Model;
use Illuminate\Database\Eloquent\SoftDeletes;

class Rankings extends Model
{
    use HasFactory;
    use SoftDeletes;
    protected $guarded=[];
    protected $table='zfm_rankings';

    /**
     * 修改
     * @param $field
     * @param $fangID
     * @param $SecondaryMessageUpdated
     * @return mixed
     */
    public static function change($field,$fangID,$SecondaryMessageUpdated){
        $data= self::where($field,$fangID,$fangID)->first();
        return $data->fill($SecondaryMessageUpdated)
            ->save();
    }
}
